import { useUserInfo } from "../store";

const LoadUserInfo = () => {
  const { loadUserInfo, loading } = useUserInfo();

  return (
    <button style={loading ? { textDecoration: "line-through", cursor: "not-allowed", color: "gray" } : {}} onClick={() => !loading && loadUserInfo()}>
      重新获取用户信息
    </button>
  );
};

export default LoadUserInfo;
